package edu.ec.java02.group02.domain;

import java.io.Serializable;
import java.util.List;
import javax.persistence.*;
@Table(name = "cart")
@Entity
public class Cart implements Serializable {
    @Id
    @Column(name = "card_id")
    private Integer cardId;

    @Column(name = "user_id")
    private Integer userId;

    @Column(name = "product_id")
    private Integer productId;

    @Column(name = "product_number")
    private Integer productNumber;

    private ProductInfo productInfoList;

    @Override
    public String toString() {
        return "Cart{" +
                "cardId=" + cardId +
                ", userId=" + userId +
                ", productId=" + productId +
                ", productNumber=" + productNumber +
                ", productInfoList=" + productInfoList +
                '}';
    }

    public ProductInfo getProductInfoList() {
        return productInfoList;
    }

    public void setProductInfoList(ProductInfo productInfoList) {
        this.productInfoList = productInfoList;
    }

    private static final long serialVersionUID = 1L;

    /**
     * @return card_id
     */
    public Integer getCardId() {
        return cardId;
    }

    /**
     * @param cardId
     */
    public void setCardId(Integer cardId) {
        this.cardId = cardId;
    }

    /**
     * @return user_id
     */
    public Integer getUserId() {
        return userId;
    }

    /**
     * @param userId
     */
    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    /**
     * @return product_id
     */
    public Integer getProductId() {
        return productId;
    }

    /**
     * @param productId
     */
    public void setProductId(Integer productId) {
        this.productId = productId;
    }

    /**
     * @return product_number
     */
    public Integer getProductNumber() {
        return productNumber;
    }

    /**
     * @param productNumber
     */
    public void setProductNumber(Integer productNumber) {
        this.productNumber = productNumber;
    }

}